﻿using System;
using System.Collections.Generic;
using System.Linq;
using laba2.Context;
using laba2.Entity;
using laba2.Repository.IRepository;

namespace laba2.Repository.DAO
{
    public class TaskDAO:GenericDAO<Task>,ITaskRepository
    {
        public List<Task> GetByName(string name)
        {
            using(var context=new Lab3DBContext())
            {
                return (from task in context.Set<Task>()
                        where task.Name == name
                        select task).ToList();
            }
        }

        public List<PracticalTask> GetAllPracticalTasks()
        {
            throw new NotImplementedException();
        }

        public List<BoundaryControl> GetAllBoundaryControls()
        {
            throw new NotImplementedException();
        }

        public List<FinalControl> GetAllFinalControls()
        {
            throw new NotImplementedException();
        }

        public List<Task> GetTasksByCourse(Course course)
        {
            throw new NotImplementedException();
        }

        public List<Task> GetTasksByCourseId(int id)
        {
            throw new NotImplementedException();
        }
    }
}
